package com.zpark.cloud.alibaba.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 账户实体类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Slf4j
@Table(name = "t_account")
public class Account implements Serializable {
    @Id
    @KeySql(useGeneratedKeys = true)
    private Long id; // id

    @Column(name = "user_id")
    private Long userId; // 用户id
    private BigDecimal total; // 总额度
    private BigDecimal used; // 已用余额
    private BigDecimal residue; // 剩余可用额度
}
